package com.sumer.psychology.space.infrastructure.persistence.mongo;

import com.sumer.psychology.common.spring.ApplicationContextProvider;
import com.sumer.psychology.space.infrastructure.persistence.mongo.friend.*;

/**
 * 空间的领域工厂
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/11/24
 * Time: 13:36
 */
public class SpaceDomainRegistry {
    public static MongoFriendMessageRepository friendRequestMessageRepository() {
        return ApplicationContextProvider.instance().applicationContext().getBean(FriendRequestMessageRepository.class);
    }

    public static MongoFriendMessageRepository friendRejectMessageRepository() {
        return ApplicationContextProvider.instance().applicationContext().getBean(FriendRejectMessageRepository.class);
    }

    public static MongoFriendMessageRepository friendAddMessageRepository() {
        return ApplicationContextProvider.instance().applicationContext().getBean(FriendAddMessageRepository.class);
    }

    public static MongoFriendMessageRepository friendDeleteMessageRepository() {
        return ApplicationContextProvider.instance().applicationContext().getBean(FriendDeleteMessageRepository.class);
    }
}
